#include "stdafx.h"

DESCRIPTION_11_TEST_SUITE(RenderTargetBlendDescription)

BOOST_FIXTURE_TEST_CASE(Default, TestRenderTargetBlendDescription)
{
	BOOST_REQUIRE_EQUAL(FALSE, m_desc.BlendEnable);
    BOOST_REQUIRE_EQUAL(D3D11_BLEND_ONE, m_desc.SrcBlend);
    BOOST_REQUIRE_EQUAL(D3D11_BLEND_ZERO, m_desc.DestBlend);
    BOOST_REQUIRE_EQUAL(D3D11_BLEND_OP_ADD, m_desc.BlendOp);
    BOOST_REQUIRE_EQUAL(D3D11_BLEND_ONE, m_desc.SrcBlendAlpha);
    BOOST_REQUIRE_EQUAL(D3D11_BLEND_ZERO, m_desc.DestBlendAlpha);
    BOOST_REQUIRE_EQUAL(D3D11_BLEND_OP_ADD, m_desc.BlendOpAlpha);
    BOOST_REQUIRE_EQUAL(D3D11_COLOR_WRITE_ENABLE_ALL, m_desc.RenderTargetWriteMask);
}

#define RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(type_, name_, value_) \
	DESCRIPTION_11_SETTER_TEST_CASE(type_, name_, value_, RenderTargetBlendDescription)

RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(BOOL, BlendEnable, TRUE)
RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(D3D11_BLEND, SrcBlend, D3D11_BLEND_INV_SRC_ALPHA)
RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(D3D11_BLEND, DestBlend, D3D11_BLEND_INV_SRC_ALPHA)
RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(D3D11_BLEND_OP, BlendOp, D3D11_BLEND_OP_SUBTRACT)
RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(D3D11_BLEND, SrcBlendAlpha, D3D11_BLEND_INV_SRC_ALPHA)
RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(D3D11_BLEND, DestBlendAlpha, D3D11_BLEND_INV_SRC_ALPHA)
RENDER_TARGET_BLEND_DESCRIPTION_TEST_CASE(D3D11_BLEND_OP, BlendOpAlpha, D3D11_BLEND_OP_SUBTRACT)

BOOST_AUTO_TEST_SUITE_END()
